package com.atzzy.ysmall.ysmall_api.ProductCommController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.atzzy.ysmall.ysmall_allService.ProductService.CategoryService;
import com.atzzy.ysmall.ysmall_common.vo.R;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author JAVAZeng
 * @Date 2022/3/2 19:33
 * @Version 1.0
 */
@RestController
@RequestMapping("shopList")
@CrossOrigin
public class CategoryCotroller {


    @Reference
    private CategoryService categoryService;


    @GetMapping("categorylist")
    public R listCategory(){
        return categoryService.listCategories();
    }
}
